package ace.module.product.core.impl.dao.entity;

import jakarta.annotation.Nullable;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.experimental.SuperBuilder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.relational.core.mapping.Table;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotEmpty;
import java.io.Serializable;
import ace.cmp.spring.data.jdbc.querydsl.core.annotations.LogicDelete;
import ace.cmp.spring.graphql.core.model.GenericPageContent;
import ace.module.product.api.model.dto.PmsCommonGalleryDto;

/**
* 商品应用通用相册.
*
* @author Caspar
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = PmsCommonGalleryDto.TABLE_DESC)
@Table(PmsCommonGalleryDto.TABLE_NAME)
public class PmsCommonGallery implements Serializable, GenericPageContent<Long> {

  @Id
  @Schema(title = PmsCommonGalleryDto.ID_TITLE, description = PmsCommonGalleryDto.ID_DESC)
  private Long id;

  @Schema(title = PmsCommonGalleryDto.PMS_APP_ID_TITLE, description = PmsCommonGalleryDto.PMS_APP_ID_DESC)
  private Long pmsAppId;

  /**
   * {@link ace.module.product.api.enums.PmsCommonGalleryObjectTypeEnum}
   */
  @Schema(title = PmsCommonGalleryDto.OBJECT_TYPE_TITLE, description = PmsCommonGalleryDto.OBJECT_TYPE_DESC)
  private Integer objectType;

  @Schema(title = PmsCommonGalleryDto.OBJECT_ID_TITLE, description = PmsCommonGalleryDto.OBJECT_ID_DESC)
  private Long objectId;

  @Schema(title = PmsCommonGalleryDto.OBJECT_PARENT_ID_TITLE, description = PmsCommonGalleryDto.OBJECT_PARENT_ID_DESC)
  private Long objectParentId;

  @Schema(title = PmsCommonGalleryDto.PIC_ORIGINAL_TITLE, description = PmsCommonGalleryDto.PIC_ORIGINAL_DESC)
  private String picOriginal;

  @Schema(title = PmsCommonGalleryDto.PIC_BIG_TITLE, description = PmsCommonGalleryDto.PIC_BIG_DESC)
  private String picBig;

  @Schema(title = PmsCommonGalleryDto.PIC_SMALL_TITLE, description = PmsCommonGalleryDto.PIC_SMALL_DESC)
  private String picSmall;

  @Schema(title = PmsCommonGalleryDto.PIC_THUMBNAIL_TITLE, description = PmsCommonGalleryDto.PIC_THUMBNAIL_DESC)
  private String picThumbnail;

  @Schema(title = PmsCommonGalleryDto.SORT_TITLE, description = PmsCommonGalleryDto.SORT_DESC)
  private Long sort;

  @LogicDelete
  @Schema(title = PmsCommonGalleryDto.DELETE_FLAG_TITLE, description = PmsCommonGalleryDto.DELETE_FLAG_DESC)
  private Long deleteFlag;

  @CreatedDate
  @Schema(title = PmsCommonGalleryDto.CREATE_TIME_TITLE, description = PmsCommonGalleryDto.CREATE_TIME_DESC)
  private Long createTime;

  @LastModifiedDate
  @Schema(title = PmsCommonGalleryDto.UPDATE_TIME_TITLE, description = PmsCommonGalleryDto.UPDATE_TIME_DESC)
  private Long updateTime;

  @Version
  @Schema(title = PmsCommonGalleryDto.ROW_VERSION_TITLE, description = PmsCommonGalleryDto.ROW_VERSION_DESC)
  private Long rowVersion;

}
